package cc.openhome;

/**
 * Created by Cai Ye on 2016/3/22.
 */
public class Game2RPG {
    public static void main(String[] args) {
        Game1SwordsMan swordsMan=new Game1SwordsMan();
        swordsMan.setName("Justin");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);

        Game1Magician magician=new Game1Magician();
        magician.setName("Monica");
        magician.setLevel(1);
        magician.setBlood(100);

        showBlood(swordsMan);
        showBlood(magician);
    }
    static void showBlood(Game1Role role){
        System.out.printf("%s 血量 %d%n",role.getName(),role.getBlood());
    }
}
